package com.deli.springboot.repository;

import com.deli.springboot.entity.BorrowHistory;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;


@Repository
public class BorrowHistoryRepository {

    private final ConcurrentMap<Integer, BorrowHistory> repository = new ConcurrentHashMap<>();

    private final static AtomicInteger idGenerator = new AtomicInteger();

    public List<BorrowHistory> findByExample(BorrowHistory borrowHistory) {
        //todo
        return new ArrayList<BorrowHistory>();
    }

    public Integer updateStatus(Long bookId) {
        //todo
        return 1;
    }
}
